# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=print-manager
pkgver=20.04.3
pkgrel=0
arch="all !armhf" # armhf blocked by qt5-qtdeclarative
url="https://www.kde.org/applications/utilities/"
pkgdesc="A tool for managing print jobs and printers"
license="GPL-2.0-or-later"
makedepends="extra-cmake-modules qt5-qtbase-dev qt5-qtdeclarative-dev cups-dev kconfig-dev kconfigwidgets-dev kcoreaddons-dev kdbusaddons-dev kiconthemes-dev ki18n-dev kcmutils-dev kio-dev knotifications-dev plasma-framework-dev kwidgetsaddons-dev kwindowsystem-dev"
source="https://download.kde.org/stable/release-service/$pkgver/src/print-manager-$pkgver.tar.xz"
subpackages="$pkgname-lang"
options="!check" # No tests available

build() {
	cmake -B build \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	cd build
	CTEST_OUTPUT_ON_FAILURE=TRUE ctest
}

package() {
	DESTDIR="$pkgdir" cmake --build build --target install
}

sha512sums="430116f46f69a8019dc891b108778b22f640b2ce2a6f5c4fdbee1eb84cee5f54e83c47bcac9ad85fb1e34a1072499b36943c88a444bdffc0cfb0f3f43d7950c2  print-manager-20.04.3.tar.xz"
